package com.metrics.extractors;

import java.io.Serializable;
import java.util.Map;

import org.jfree.data.time.RegularTimePeriod;

import com.database.daos.*;
import com.database.objects.*;
import com.metrics.formatters.TimeFormatter;

public abstract class MetricExtractor implements Serializable {

	private static final long serialVersionUID = -9071539889704892443L;

	protected IContributionDao contributionDao;

	protected ISumDao sumDao;

	public abstract Double extract(Developer developer, String date, Type type, Status status);

	public abstract Double extract(Developer developer, Type type, Status status, String start, String finish);
	
	public abstract Double extractTotal(Project project, Type type, Status status, String start, String finish);

	public abstract Map<RegularTimePeriod, Double> extractWithDate(Developer developer, Type type, Status status, String start, String finish, TimeFormatter formatter);

	public void setContributionDao(IContributionDao contributionDao) {
		this.contributionDao = contributionDao;
	}

	public void setSumDao(ISumDao sumDao) {
		this.sumDao = sumDao;
	}

}